package com.atguigu.spzx.manager.mapper;

import java.util.List;

import com.atguigu.spzx.manager.vo.brand.BrandQueryRespVo;
import com.atguigu.spzx.manager.vo.categoryBrand.CategoryBrandQueryReqVo;
import com.atguigu.spzx.manager.vo.categoryBrand.CategoryBrandQueryRespVo;
import com.atguigu.spzx.manager.entity.CategoryBrand;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * CategoryBrandMapper
 * </p>
 *
 * @author flyduck
 * @since 2023/10/29
 */
@Mapper
public interface CategoryBrandMapper extends BaseMapper<CategoryBrand> {

    /**
     * 条件分页查询
     *
     * @param pageParam
     * @param reqVo
     * @return
     */
    Page<CategoryBrandQueryRespVo> getCategoryBrandPageByQuery(@Param("pageParam") Page<CategoryBrand> pageParam, @Param("vo") CategoryBrandQueryReqVo reqVo);

    /**
     * 根据分类id查询对应的品牌数据
     *
     * @param categoryId
     * @return
     */
    List<BrandQueryRespVo> getBrandListByCategoryId(@Param("categoryId") Long categoryId);
}
